package IC.Parser;

import java_cup.runtime.Symbol;

public class Token extends Symbol {
    private int line;

	public Token(int id, int line) {
        this(id, line, null);
     }
	public Token(int id, int line, String val) {
		super(id,line+1,0,val);
		this.line = line+1;
	}
	public int getLine() {
		return line;
	}
	
	public Object getSym() {
		return sym;
	}
	
	public Object getVal() {
		return value;
	}
	
	public String toString() {
		return line + ": " + sym + (value != null ? "(" + value + ")" : "");
	}

	
	
}

